<%@ page language="java" pageEncoding="UTF-8"%>
<%@ taglib uri="/struts-tags" prefix="s"%>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,height=device-height,inital-scale=1.0,maximum-scale=1.0,user-scalable=no;">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black">
<meta name="format-detection" content="telephone=no">
		<title>我的订单</title>
		<link href="${pageContext.request.contextPath}/bettery/css/itao.css"	rel="stylesheet" />

		<script type="text/javascript" src="${pageContext.request.contextPath}/dewei/js/jquery.js"></script>
<style type="text/css">
 
ul.products {
	margin: 0px;
	list-style: none;
	padding: 0px;margin-top: 20px;
}
ul.products li {
	border-bottom: 1px solid rgba(0, 0, 0, 0.2);
	
	font-size: 13px;
	padding: 3px 5px;
}

ul.products li:hover {
	background: rgba(0, 0, 0, 0.2);
}

ul.products li img,ul.products li .info,ul.products li .oper {
	display: inline-block;vertical-align: middle;
}
ul.products li .btn{
	float: right;height: 30px;margin-top: 10px;
}

</style>
</head>
<body>
	<div class='search_bar'>
		<span>订单信息</span>
	</div>
		<ul class="products">
		<s:if test='null==dingdans||dingdans.size==0'>
		没有发现您的订单信息！
		</s:if>
			<s:iterator value="dingdans">
				<li>
				   <div>
					<img xSrc="${imageUrl}" src="${pageContext.request.contextPath}/dewei/img/wait.gif" style="top: 0px;" width="72" height="72">
					<div class='info'>
						<div>
							订单号：${dingDanUid}
						</div>
						<div>
							电池品牌：${pinPai}
						</div>
						<div>
							电池型号：${xingHao}
						</div>
						<div>
							换购价格：${price}元
						</div>
						<hr/>
					<s:if test='"附近门店更换"==changeType'>
						<div>
							店名：${mendianName}
						</div>
						</div>
						<div>
						<div style="width:198px;:break-word; word-break: normal;">
							地址：${mendianAddr}
						</div>
						<div>
							联系人：${mendianLxr}
						</div>
						<div>
							联系电话：${menDianTel}
						</div>
						</s:if>
						<s:elseif test='"人工上门更换"==changeType'>
						</div>
						<div>
						<div>
						本网将在24小时之内,与您联系安排人员人工上门更换<br>
						服务热线：400-990-5660
						</div>
						</s:elseif>
						<s:elseif test='"附近无网点"==changeType'>
						</div>
						<div>
						<div>
						您附近无网点，
						请等待客服与您联系<br>
						服务热线：400-990-5660
						</div>
						</s:elseif>
						
						<a style="display: inline;color: red;"> 
					    <s:if test='"0"==state'>已下单</s:if> <s:elseif	test='"1"==state'>已完成</s:elseif> <s:elseif test='"2"==state'>已指派</s:elseif>
						<s:elseif test='"3"==state'>已作废</s:elseif> <s:elseif	test='"4"==state'>已超期</s:elseif>
						<s:elseif test='"5"==state'>已核实</s:elseif> <s:else>处理中</s:else> </a>
						</div>
					</div>
					
				</li>
			</s:iterator>
		</ul>
		<script type="text/javascript">
    var scrollLoad = (function (options) {
        var defaults = (arguments.length == 0) ? { src: 'xSrc', time: 300} : { src: options.src || 'xSrc', time: options.time ||300};
        var camelize = function (s) {
            return s.replace(/-(\w)/g, function (strMatch, p1) {
                return p1.toUpperCase();
            });
        };
        this.getStyle = function (element, property) {
            if (arguments.length != 2) return false;
            var value = element.style[camelize(property)];
            if (!value) {
                if (document.defaultView && document.defaultView.getComputedStyle) {
                    var css = document.defaultView.getComputedStyle(element, null);
                    value = css ? css.getPropertyValue(property) : null;
                } else if (element.currentStyle) {
                    value = element.currentStyle[camelize(property)];
                }
            }
            return value == 'auto' ? '' : value;
        };
        var _init = function () {
            var offsetPage = window.pageYOffset ? window.pageYOffset : window.document.documentElement.scrollTop,
                offsetWindow = offsetPage + Number(window.innerHeight ? window.innerHeight : document.documentElement.clientHeight),
                docImg = document.images,
                _len = docImg.length;
            if (!_len) return false;
            for (var i = 0; i < _len; i++) {
                var attrSrc = docImg[i].getAttribute(defaults.src),
                    o = docImg[i], tag = o.nodeName.toLowerCase();
                if (o) {
                    postPage = o.getBoundingClientRect().top + window.document.documentElement.scrollTop + window.document.body.scrollTop; postWindow = postPage + Number(this.getStyle(o, 'height').replace('px', ''));
                    if ((postPage > offsetPage && postPage < offsetWindow) || (postWindow > offsetPage && postWindow < offsetWindow)) {
                        if (tag === "img" && attrSrc !== null) {
                            o.setAttribute("src", attrSrc);
                        }
                        o = null;
                    }
                }
            };
            window.onscroll = function () {
                setTimeout(function () {
                    _init();
                }, defaults.time);
            }
        };
        return _init();
    });
    scrollLoad();
</script> 
	</body>
</html>
